package com.learn.hibernatevalidator.chapter02.fieldlevel;

import jakarta.validation.constraints.AssertTrue;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 字段约束
 *
 * @author: liyf
 * @create: 2024-12-19 22:01
 **/
@Data
public class Car {

    @NotNull
    private String manufacturer;

    /**
     * 值只能为 true
     */
    @AssertTrue
    private boolean isRegistered;
}
